3.1088 \(\int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))} \, dx\)

Optimal. Leaf size=234 \[ \frac {c^2+4 i c d-7 d^2}{8 f (-d+i c)^3 \left (a^3+i a^3 \tan (e+f x)\right )}+\frac {x \left (c^4+4 i c^3 d-6 c^2 d^2-4 i c d^3-7 d^4\right )}{8 a^3 (c-i d) (c+i d)^4}+\frac {d^4 \log (c \cos (e+f x)+d \sin (e+f x))}{a^3 f (c+i d)^4 (d+i c)}+\frac {-3 d+i c}{8 a f (c+i d)^2 (a+i a \tan (e+f x))^2}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3} \]

[Out]

1/8*(c^4+4*I*c^3*d-6*c^2*d^2-4*I*c*d^3-7*d^4)*x/a^3/(c-I*d)/(c+I*d)^4+d^4*ln(c*cos(f*x+e)+d*sin(f*x+e))/a^3/(c
+I*d)^4/(I*c+d)/f-1/6/(I*c-d)/f/(a+I*a*tan(f*x+e))^3+1/8*(I*c-3*d)/a/(c+I*d)^2/f/(a+I*a*tan(f*x+e))^2+1/8*(c^2
+4*I*c*d-7*d^2)/(I*c-d)^3/f/(a^3+I*a^3*tan(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.67, antiderivative size = 234, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3559, 3596, 3531, 3530} \[ \frac {c^2+4 i c d-7 d^2}{8 f (-d+i c)^3 \left (a^3+i a^3 \tan (e+f x)\right )}+\frac {x \left (-6 c^2 d^2+4 i c^3 d+c^4-4 i c d^3-7 d^4\right )}{8 a^3 (c-i d) (c+i d)^4}+\frac {d^4 \log (c \cos (e+f x)+d \sin (e+f x))}{a^3 f (c+i d)^4 (d+i c)}+\frac {-3 d+i c}{8 a f (c+i d)^2 (a+i a \tan (e+f x))^2}-\frac {1}{6 f (-d+i c) (a+i a \tan (e+f x))^3} \]

Antiderivative was successfully verified.

[In]

Int[1/((a + I*a*Tan[e + f*x])^3*(c + d*Tan[e + f*x])),x]

[Out]

((c^4 + (4*I)*c^3*d - 6*c^2*d^2 - (4*I)*c*d^3 - 7*d^4)*x)/(8*a^3*(c - I*d)*(c + I*d)^4) + (d^4*Log[c*Cos[e + f
*x] + d*Sin[e + f*x]])/(a^3*(c + I*d)^4*(I*c + d)*f) - 1/(6*(I*c - d)*f*(a + I*a*Tan[e + f*x])^3) + (I*c - 3*d
)/(8*a*(c + I*d)^2*f*(a + I*a*Tan[e + f*x])^2) + (c^2 + (4*I)*c*d - 7*d^2)/(8*(I*c - d)^3*f*(a^3 + I*a^3*Tan[e
 + f*x]))

Rule 3530

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c*Log[Re
moveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]])/(b*f), x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rule 3531

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((a*c +
 b*d)*x)/(a^2 + b^2), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rule 3559

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[(a*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(2*f*m*(b*c - a*d)), x] + Dist[1/(2*a*m*(b*c - a*d))
, Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[b*c*m - a*d*(2*m + n + 1) + b*d*(m + n + 1)*Tan
[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2
+ d^2, 0] && LtQ[m, 0] && (IntegerQ[m] || IntegersQ[2*m, 2*n])

Rule 3596

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((a*A + b*B)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(2
*f*m*(b*c - a*d)), x] + Dist[1/(2*a*m*(b*c - a*d)), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Si
mp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x
] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] &&  !GtQ[n,
0]

Rubi steps

\begin {align*} \int \frac {1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))} \, dx &=-\frac {1}{6 (i c-d) f (a+i a \tan (e+f x))^3}-\frac {\int \frac {-3 a (i c-2 d)-3 i a d \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx}{6 a^2 (i c-d)}\\ &=-\frac {1}{6 (i c-d) f (a+i a \tan (e+f x))^3}+\frac {i c-3 d}{8 a (c+i d)^2 f (a+i a \tan (e+f x))^2}-\frac {\int \frac {-6 a^2 \left (c^2+3 i c d-4 d^2\right )-6 a^2 (c+3 i d) d \tan (e+f x)}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))} \, dx}{24 a^4 (c+i d)^2}\\ &=-\frac {1}{6 (i c-d) f (a+i a \tan (e+f x))^3}+\frac {i c-3 d}{8 a (c+i d)^2 f (a+i a \tan (e+f x))^2}+\frac {c^2+4 i c d-7 d^2}{8 (i c-d)^3 f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac {\int \frac {6 a^3 \left (i c^3-4 c^2 d-7 i c d^2+8 d^3\right )+6 a^3 d \left (i c^2-4 c d-7 i d^2\right ) \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{48 a^6 (i c-d)^3}\\ &=\frac {\left (c^4+4 i c^3 d-6 c^2 d^2-4 i c d^3-7 d^4\right ) x}{8 a^3 (c-i d) (c+i d)^4}-\frac {1}{6 (i c-d) f (a+i a \tan (e+f x))^3}+\frac {i c-3 d}{8 a (c+i d)^2 f (a+i a \tan (e+f x))^2}+\frac {c^2+4 i c d-7 d^2}{8 (i c-d)^3 f \left (a^3+i a^3 \tan (e+f x)\right )}+\frac {d^4 \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{a^3 (c+i d)^4 (i c+d)}\\ &=\frac {\left (c^4+4 i c^3 d-6 c^2 d^2-4 i c d^3-7 d^4\right ) x}{8 a^3 (c-i d) (c+i d)^4}+\frac {d^4 \log (c \cos (e+f x)+d \sin (e+f x))}{a^3 (c+i d)^4 (i c+d) f}-\frac {1}{6 (i c-d) f (a+i a \tan (e+f x))^3}+\frac {i c-3 d}{8 a (c+i d)^2 f (a+i a \tan (e+f x))^2}+\frac {c^2+4 i c d-7 d^2}{8 (i c-d)^3 f \left (a^3+i a^3 \tan (e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 2.04, size = 435, normalized size = 1.86 \[ \frac {\sec ^3(e+f x) \left (-9 i c^4 \sin (e+f x)-12 c^4 f x \sin (3 (e+f x))+2 i c^4 \sin (3 (e+f x))+36 c^3 d \sin (e+f x)-4 c^3 d \sin (3 (e+f x))-48 i c^3 d f x \sin (3 (e+f x))+42 i c^2 d^2 \sin (e+f x)+72 c^2 d^2 f x \sin (3 (e+f x))-3 \left (9 c^4+28 i c^3 d-18 c^2 d^2+28 i c d^3-27 d^4\right ) \cos (e+f x)+2 \cos (3 (e+f x)) \left (c^4 (-1+6 i f x)-2 c^3 d (12 f x+i)-36 i c^2 d^2 f x+24 d^4 \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right )+2 c d^3 (12 f x-i)+d^4 (1-42 i f x)\right )+48 i d^4 \sin (3 (e+f x)) \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right )+36 c d^3 \sin (e+f x)-4 c d^3 \sin (3 (e+f x))+48 i c d^3 f x \sin (3 (e+f x))+51 i d^4 \sin (e+f x)-2 i d^4 \sin (3 (e+f x))+84 d^4 f x \sin (3 (e+f x))\right )}{96 a^3 f (c-i d) (c+i d)^4 (\tan (e+f x)-i)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((a + I*a*Tan[e + f*x])^3*(c + d*Tan[e + f*x])),x]

[Out]

(Sec[e + f*x]^3*(-3*(9*c^4 + (28*I)*c^3*d - 18*c^2*d^2 + (28*I)*c*d^3 - 27*d^4)*Cos[e + f*x] + 2*Cos[3*(e + f*
x)]*((-36*I)*c^2*d^2*f*x + c^4*(-1 + (6*I)*f*x) + d^4*(1 - (42*I)*f*x) + 2*c*d^3*(-I + 12*f*x) - 2*c^3*d*(I +
12*f*x) + 24*d^4*Log[(c*Cos[e + f*x] + d*Sin[e + f*x])^2]) - (9*I)*c^4*Sin[e + f*x] + 36*c^3*d*Sin[e + f*x] +
(42*I)*c^2*d^2*Sin[e + f*x] + 36*c*d^3*Sin[e + f*x] + (51*I)*d^4*Sin[e + f*x] + (2*I)*c^4*Sin[3*(e + f*x)] - 4
*c^3*d*Sin[3*(e + f*x)] - 4*c*d^3*Sin[3*(e + f*x)] - (2*I)*d^4*Sin[3*(e + f*x)] - 12*c^4*f*x*Sin[3*(e + f*x)]
- (48*I)*c^3*d*f*x*Sin[3*(e + f*x)] + 72*c^2*d^2*f*x*Sin[3*(e + f*x)] + (48*I)*c*d^3*f*x*Sin[3*(e + f*x)] + 84
*d^4*f*x*Sin[3*(e + f*x)] + (48*I)*d^4*Log[(c*Cos[e + f*x] + d*Sin[e + f*x])^2]*Sin[3*(e + f*x)]))/(96*a^3*(c
- I*d)*(c + I*d)^4*f*(-I + Tan[e + f*x])^3)

________________________________________________________________________________________

fricas [A]  time = 0.51, size = 267, normalized size = 1.14 \[ \frac {{\left (96 \, d^{4} e^{\left (6 i \, f x + 6 i \, e\right )} \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right ) - 2 \, c^{4} - 4 i \, c^{3} d - 4 i \, c d^{3} + 2 \, d^{4} + {\left (12 i \, c^{4} - 48 \, c^{3} d - 72 i \, c^{2} d^{2} + 48 \, c d^{3} - 180 i \, d^{4}\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} - {\left (18 \, c^{4} + 60 i \, c^{3} d - 48 \, c^{2} d^{2} + 60 i \, c d^{3} - 66 \, d^{4}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - {\left (9 \, c^{4} + 24 i \, c^{3} d - 6 \, c^{2} d^{2} + 24 i \, c d^{3} - 15 \, d^{4}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{{\left (96 i \, a^{3} c^{5} - 288 \, a^{3} c^{4} d - 192 i \, a^{3} c^{3} d^{2} - 192 \, a^{3} c^{2} d^{3} - 288 i \, a^{3} c d^{4} + 96 \, a^{3} d^{5}\right )} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^3/(c+d*tan(f*x+e)),x, algorithm="fricas")

[Out]

(96*d^4*e^(6*I*f*x + 6*I*e)*log(((I*c + d)*e^(2*I*f*x + 2*I*e) + I*c - d)/(I*c + d)) - 2*c^4 - 4*I*c^3*d - 4*I
*c*d^3 + 2*d^4 + (12*I*c^4 - 48*c^3*d - 72*I*c^2*d^2 + 48*c*d^3 - 180*I*d^4)*f*x*e^(6*I*f*x + 6*I*e) - (18*c^4
 + 60*I*c^3*d - 48*c^2*d^2 + 60*I*c*d^3 - 66*d^4)*e^(4*I*f*x + 4*I*e) - (9*c^4 + 24*I*c^3*d - 6*c^2*d^2 + 24*I
*c*d^3 - 15*d^4)*e^(2*I*f*x + 2*I*e))*e^(-6*I*f*x - 6*I*e)/((96*I*a^3*c^5 - 288*a^3*c^4*d - 192*I*a^3*c^3*d^2
- 192*a^3*c^2*d^3 - 288*I*a^3*c*d^4 + 96*a^3*d^5)*f)

________________________________________________________________________________________

giac [B]  time = 0.85, size = 447, normalized size = 1.91 \[ \frac {2 \, {\left (-\frac {i \, d^{5} \log \left (-i \, d \tan \left (f x + e\right ) - i \, c\right )}{2 \, a^{3} c^{5} d + 6 i \, a^{3} c^{4} d^{2} - 4 \, a^{3} c^{3} d^{3} + 4 i \, a^{3} c^{2} d^{4} - 6 \, a^{3} c d^{5} - 2 i \, a^{3} d^{6}} + \frac {{\left (-i \, c^{3} + 5 \, c^{2} d + 11 i \, c d^{2} - 15 \, d^{3}\right )} \log \left (i \, \tan \left (f x + e\right ) + 1\right )}{32 \, a^{3} c^{4} + 128 i \, a^{3} c^{3} d - 192 \, a^{3} c^{2} d^{2} - 128 i \, a^{3} c d^{3} + 32 \, a^{3} d^{4}} + \frac {\log \left (\tan \left (f x + e\right ) + i\right )}{-32 i \, a^{3} c - 32 \, a^{3} d} + \frac {11 i \, c^{3} \tan \left (f x + e\right )^{3} - 55 \, c^{2} d \tan \left (f x + e\right )^{3} - 121 i \, c d^{2} \tan \left (f x + e\right )^{3} + 165 \, d^{3} \tan \left (f x + e\right )^{3} + 45 \, c^{3} \tan \left (f x + e\right )^{2} + 225 i \, c^{2} d \tan \left (f x + e\right )^{2} - 495 \, c d^{2} \tan \left (f x + e\right )^{2} - 579 i \, d^{3} \tan \left (f x + e\right )^{2} - 69 i \, c^{3} \tan \left (f x + e\right ) + 345 \, c^{2} d \tan \left (f x + e\right ) + 711 i \, c d^{2} \tan \left (f x + e\right ) - 699 \, d^{3} \tan \left (f x + e\right ) - 51 \, c^{3} - 223 i \, c^{2} d + 385 \, c d^{2} + 301 i \, d^{3}}{{\left (192 \, a^{3} c^{4} + 768 i \, a^{3} c^{3} d - 1152 \, a^{3} c^{2} d^{2} - 768 i \, a^{3} c d^{3} + 192 \, a^{3} d^{4}\right )} {\left (\tan \left (f x + e\right ) - i\right )}^{3}}\right )}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^3/(c+d*tan(f*x+e)),x, algorithm="giac")

[Out]

2*(-I*d^5*log(-I*d*tan(f*x + e) - I*c)/(2*a^3*c^5*d + 6*I*a^3*c^4*d^2 - 4*a^3*c^3*d^3 + 4*I*a^3*c^2*d^4 - 6*a^
3*c*d^5 - 2*I*a^3*d^6) + (-I*c^3 + 5*c^2*d + 11*I*c*d^2 - 15*d^3)*log(I*tan(f*x + e) + 1)/(32*a^3*c^4 + 128*I*
a^3*c^3*d - 192*a^3*c^2*d^2 - 128*I*a^3*c*d^3 + 32*a^3*d^4) + log(tan(f*x + e) + I)/(-32*I*a^3*c - 32*a^3*d) +
 (11*I*c^3*tan(f*x + e)^3 - 55*c^2*d*tan(f*x + e)^3 - 121*I*c*d^2*tan(f*x + e)^3 + 165*d^3*tan(f*x + e)^3 + 45
*c^3*tan(f*x + e)^2 + 225*I*c^2*d*tan(f*x + e)^2 - 495*c*d^2*tan(f*x + e)^2 - 579*I*d^3*tan(f*x + e)^2 - 69*I*
c^3*tan(f*x + e) + 345*c^2*d*tan(f*x + e) + 711*I*c*d^2*tan(f*x + e) - 699*d^3*tan(f*x + e) - 51*c^3 - 223*I*c
^2*d + 385*c*d^2 + 301*I*d^3)/((192*a^3*c^4 + 768*I*a^3*c^3*d - 1152*a^3*c^2*d^2 - 768*I*a^3*c*d^3 + 192*a^3*d
^4)*(tan(f*x + e) - I)^3))/f

________________________________________________________________________________________

maple [B]  time = 0.36, size = 564, normalized size = 2.41 \[ \frac {5 i c^{2} d}{8 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}+\frac {i d^{4} \ln \left (c +d \tan \left (f x +e \right )\right )}{f \,a^{3} \left (i d -c \right ) \left (i d +c \right )^{4}}-\frac {i c^{3}}{8 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {7 i d^{3}}{8 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}-\frac {c^{3}}{6 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{3}}+\frac {c \,d^{2}}{2 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{3}}-\frac {i c^{2} d}{2 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{3}}-\frac {i \ln \left (\tan \left (f x +e \right )-i\right ) c^{3}}{16 f \,a^{3} \left (i d +c \right )^{4}}+\frac {c^{3}}{8 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}-\frac {11 c \,d^{2}}{8 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )}+\frac {i d^{3}}{6 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{3}}-\frac {i \ln \left (\tan \left (f x +e \right )+i\right )}{f \,a^{3} \left (16 i d -16 c \right )}+\frac {5 c^{2} d}{8 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {3 d^{3}}{8 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {7 i c \,d^{2}}{8 f \,a^{3} \left (i d +c \right )^{4} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {11 i \ln \left (\tan \left (f x +e \right )-i\right ) c \,d^{2}}{16 f \,a^{3} \left (i d +c \right )^{4}}+\frac {5 \ln \left (\tan \left (f x +e \right )-i\right ) c^{2} d}{16 f \,a^{3} \left (i d +c \right )^{4}}-\frac {15 \ln \left (\tan \left (f x +e \right )-i\right ) d^{3}}{16 f \,a^{3} \left (i d +c \right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(f*x+e))^3/(c+d*tan(f*x+e)),x)

[Out]

5/8*I/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)*c^2*d+I/f/a^3*d^4/(I*d-c)/(c+I*d)^4*ln(c+d*tan(f*x+e))-1/8*I/f/a^3/(c+I*d
)^4/(tan(f*x+e)-I)^2*c^3-7/8*I/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)*d^3-1/6/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^3*c^3+1/2
/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^3*c*d^2-1/2*I/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^3*c^2*d-1/16*I/f/a^3/(c+I*d)^4*ln
(tan(f*x+e)-I)*c^3+1/8/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)*c^3-11/8/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)*c*d^2+1/6*I/f/a^
3/(c+I*d)^4/(tan(f*x+e)-I)^3*d^3-I/f/a^3/(16*I*d-16*c)*ln(tan(f*x+e)+I)+5/8/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^2*c
^2*d-3/8/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^2*d^3+7/8*I/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^2*c*d^2+11/16*I/f/a^3/(c+I*
d)^4*ln(tan(f*x+e)-I)*c*d^2+5/16/f/a^3/(c+I*d)^4*ln(tan(f*x+e)-I)*c^2*d-15/16/f/a^3/(c+I*d)^4*ln(tan(f*x+e)-I)
*d^3

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^3/(c+d*tan(f*x+e)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

mupad [B]  time = 10.00, size = 1952, normalized size = 8.34 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + a*tan(e + f*x)*1i)^3*(c + d*tan(e + f*x))),x)

[Out]

symsum(log(- (81*c*d^5 + c^5*d + d^6*56i - c^2*d^4*64i - 30*c^3*d^3 + c^4*d^2*8i)*(a^3*d^8 + a^3*c*d^7*6i - 15
*a^3*c^2*d^6 - a^3*c^3*d^5*20i + 15*a^3*c^4*d^4 + a^3*c^5*d^3*6i - a^3*c^6*d^2) - root(a^9*c^5*d^5*e^3*7168i +
 3584*a^9*c^6*d^4*e^3 - 3584*a^9*c^4*d^6*e^3 + 3328*a^9*c^8*d^2*e^3 - 3328*a^9*c^2*d^8*e^3 + a^9*c^7*d^3*e^3*2
048i + a^9*c^3*d^7*e^3*2048i - a^9*c^9*d*e^3*1536i - a^9*c*d^9*e^3*1536i + 256*a^9*d^10*e^3 - 256*a^9*c^10*e^3
 - a^3*c*d^7*e*56i - a^3*c^7*d*e*8i - 68*a^3*c^2*d^6*e + a^3*c^5*d^3*e*56i - 54*a^3*c^4*d^4*e + 28*a^3*c^6*d^2
*e + a^3*c^3*d^5*e*8i - 241*a^3*d^8*e - a^3*c^8*e - c^3*d^4*1i + 5*c^2*d^5 + c*d^6*11i - 15*d^7, e, k)*((a^3*d
^8 + a^3*c*d^7*6i - 15*a^3*c^2*d^6 - a^3*c^3*d^5*20i + 15*a^3*c^4*d^4 + a^3*c^5*d^3*6i - a^3*c^6*d^2)*(8*a^3*c
^7 - a^3*d^7*56i - 264*a^3*c*d^6 + a^3*c^6*d*56i + a^3*c^2*d^5*520i + 568*a^3*c^3*d^4 - a^3*c^4*d^3*392i - 184
*a^3*c^5*d^2) + root(a^9*c^5*d^5*e^3*7168i + 3584*a^9*c^6*d^4*e^3 - 3584*a^9*c^4*d^6*e^3 + 3328*a^9*c^8*d^2*e^
3 - 3328*a^9*c^2*d^8*e^3 + a^9*c^7*d^3*e^3*2048i + a^9*c^3*d^7*e^3*2048i - a^9*c^9*d*e^3*1536i - a^9*c*d^9*e^3
*1536i + 256*a^9*d^10*e^3 - 256*a^9*c^10*e^3 - a^3*c*d^7*e*56i - a^3*c^7*d*e*8i - 68*a^3*c^2*d^6*e + a^3*c^5*d
^3*e*56i - 54*a^3*c^4*d^4*e + 28*a^3*c^6*d^2*e + a^3*c^3*d^5*e*8i - 241*a^3*d^8*e - a^3*c^8*e - c^3*d^4*1i + 5
*c^2*d^5 + c*d^6*11i - 15*d^7, e, k)*((512*a^6*c^7*d - 512*a^6*c*d^7 + a^6*c^2*d^6*3072i + 7680*a^6*c^3*d^5 -
a^6*c^4*d^4*10240i - 7680*a^6*c^5*d^3 + a^6*c^6*d^2*3072i)*(a^3*d^8 + a^3*c*d^7*6i - 15*a^3*c^2*d^6 - a^3*c^3*
d^5*20i + 15*a^3*c^4*d^4 + a^3*c^5*d^3*6i - a^3*c^6*d^2) - tan(e + f*x)*(a^3*d^8 + a^3*c*d^7*6i - 15*a^3*c^2*d
^6 - a^3*c^3*d^5*20i + 15*a^3*c^4*d^4 + a^3*c^5*d^3*6i - a^3*c^6*d^2)*(128*a^6*c^8 + 384*a^6*d^8 - a^6*c*d^7*2
304i + a^6*c^7*d*768i - 5888*a^6*c^2*d^6 + a^6*c^3*d^5*8448i + 7680*a^6*c^4*d^4 - a^6*c^5*d^3*4864i - 2304*a^6
*c^6*d^2)) + tan(e + f*x)*(a^3*c*d^6*688i - 192*a^3*d^7 + 16*a^3*c^6*d + 976*a^3*c^2*d^5 - a^3*c^3*d^4*736i -
352*a^3*c^4*d^3 + a^3*c^5*d^2*112i)*(a^3*d^8 + a^3*c*d^7*6i - 15*a^3*c^2*d^6 - a^3*c^3*d^5*20i + 15*a^3*c^4*d^
4 + a^3*c^5*d^3*6i - a^3*c^6*d^2)) - tan(e + f*x)*(49*d^6 - c*d^5*56i - 30*c^2*d^4 + c^3*d^3*8i + c^4*d^2)*(a^
3*d^8 + a^3*c*d^7*6i - 15*a^3*c^2*d^6 - a^3*c^3*d^5*20i + 15*a^3*c^4*d^4 + a^3*c^5*d^3*6i - a^3*c^6*d^2))*root
(a^9*c^5*d^5*e^3*7168i + 3584*a^9*c^6*d^4*e^3 - 3584*a^9*c^4*d^6*e^3 + 3328*a^9*c^8*d^2*e^3 - 3328*a^9*c^2*d^8
*e^3 + a^9*c^7*d^3*e^3*2048i + a^9*c^3*d^7*e^3*2048i - a^9*c^9*d*e^3*1536i - a^9*c*d^9*e^3*1536i + 256*a^9*d^1
0*e^3 - 256*a^9*c^10*e^3 - a^3*c*d^7*e*56i - a^3*c^7*d*e*8i - 68*a^3*c^2*d^6*e + a^3*c^5*d^3*e*56i - 54*a^3*c^
4*d^4*e + 28*a^3*c^6*d^2*e + a^3*c^3*d^5*e*8i - 241*a^3*d^8*e - a^3*c^8*e - c^3*d^4*1i + 5*c^2*d^5 + c*d^6*11i
 - 15*d^7, e, k), k, 1, 3)/f - ((c*d*32i + 10*c^2 - 34*d^2)/(24*a^3*(3*c*d^2 - c^2*d*3i - c^3 + d^3*1i)) + (ta
n(e + f*x)*(c*d*12i + 3*c^2 - 17*d^2)*1i)/(8*a^3*(3*c*d^2 - c^2*d*3i - c^3 + d^3*1i)) - (tan(e + f*x)^2*(c*d*4
i + c^2 - 7*d^2))/(8*a^3*(3*c*d^2 - c^2*d*3i - c^3 + d^3*1i)))/(f*(3*tan(e + f*x) + tan(e + f*x)^2*3i - tan(e
+ f*x)^3 - 1i))

________________________________________________________________________________________

sympy [A]  time = 34.61, size = 1195, normalized size = 5.11 \[ \frac {x \left (- c^{3} - 5 i c^{2} d + 11 c d^{2} + 15 i d^{3}\right )}{- 8 a^{3} c^{4} - 32 i a^{3} c^{3} d + 48 a^{3} c^{2} d^{2} + 32 i a^{3} c d^{3} - 8 a^{3} d^{4}} + \begin {cases} \frac {\left (512 a^{6} c^{5} f^{2} e^{6 i e} + 2560 i a^{6} c^{4} d f^{2} e^{6 i e} - 5120 a^{6} c^{3} d^{2} f^{2} e^{6 i e} - 5120 i a^{6} c^{2} d^{3} f^{2} e^{6 i e} + 2560 a^{6} c d^{4} f^{2} e^{6 i e} + 512 i a^{6} d^{5} f^{2} e^{6 i e}\right ) e^{- 6 i f x} + \left (2304 a^{6} c^{5} f^{2} e^{8 i e} + 13056 i a^{6} c^{4} d f^{2} e^{8 i e} - 29184 a^{6} c^{3} d^{2} f^{2} e^{8 i e} - 32256 i a^{6} c^{2} d^{3} f^{2} e^{8 i e} + 17664 a^{6} c d^{4} f^{2} e^{8 i e} + 3840 i a^{6} d^{5} f^{2} e^{8 i e}\right ) e^{- 4 i f x} + \left (4608 a^{6} c^{5} f^{2} e^{10 i e} + 29184 i a^{6} c^{4} d f^{2} e^{10 i e} - 76800 a^{6} c^{3} d^{2} f^{2} e^{10 i e} - 101376 i a^{6} c^{2} d^{3} f^{2} e^{10 i e} + 66048 a^{6} c d^{4} f^{2} e^{10 i e} + 16896 i a^{6} d^{5} f^{2} e^{10 i e}\right ) e^{- 2 i f x}}{- 24576 i a^{9} c^{6} f^{3} e^{12 i e} + 147456 a^{9} c^{5} d f^{3} e^{12 i e} + 368640 i a^{9} c^{4} d^{2} f^{3} e^{12 i e} - 491520 a^{9} c^{3} d^{3} f^{3} e^{12 i e} - 368640 i a^{9} c^{2} d^{4} f^{3} e^{12 i e} + 147456 a^{9} c d^{5} f^{3} e^{12 i e} + 24576 i a^{9} d^{6} f^{3} e^{12 i e}} & \text {for}\: - 24576 i a^{9} c^{6} f^{3} e^{12 i e} + 147456 a^{9} c^{5} d f^{3} e^{12 i e} + 368640 i a^{9} c^{4} d^{2} f^{3} e^{12 i e} - 491520 a^{9} c^{3} d^{3} f^{3} e^{12 i e} - 368640 i a^{9} c^{2} d^{4} f^{3} e^{12 i e} + 147456 a^{9} c d^{5} f^{3} e^{12 i e} + 24576 i a^{9} d^{6} f^{3} e^{12 i e} \neq 0 \\x \left (- \frac {c^{3} + 5 i c^{2} d - 11 c d^{2} - 15 i d^{3}}{8 a^{3} c^{4} + 32 i a^{3} c^{3} d - 48 a^{3} c^{2} d^{2} - 32 i a^{3} c d^{3} + 8 a^{3} d^{4}} + \frac {c^{3} e^{6 i e} + 3 c^{3} e^{4 i e} + 3 c^{3} e^{2 i e} + c^{3} + 5 i c^{2} d e^{6 i e} + 13 i c^{2} d e^{4 i e} + 11 i c^{2} d e^{2 i e} + 3 i c^{2} d - 11 c d^{2} e^{6 i e} - 21 c d^{2} e^{4 i e} - 13 c d^{2} e^{2 i e} - 3 c d^{2} - 15 i d^{3} e^{6 i e} - 11 i d^{3} e^{4 i e} - 5 i d^{3} e^{2 i e} - i d^{3}}{8 a^{3} c^{4} e^{6 i e} + 32 i a^{3} c^{3} d e^{6 i e} - 48 a^{3} c^{2} d^{2} e^{6 i e} - 32 i a^{3} c d^{3} e^{6 i e} + 8 a^{3} d^{4} e^{6 i e}}\right ) & \text {otherwise} \end {cases} - \frac {i d^{4} \log {\left (\frac {i c - d}{i c e^{2 i e} + d e^{2 i e}} + e^{2 i f x} \right )}}{a^{3} f \left (c - i d\right ) \left (c + i d\right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))**3/(c+d*tan(f*x+e)),x)

[Out]

x*(-c**3 - 5*I*c**2*d + 11*c*d**2 + 15*I*d**3)/(-8*a**3*c**4 - 32*I*a**3*c**3*d + 48*a**3*c**2*d**2 + 32*I*a**
3*c*d**3 - 8*a**3*d**4) + Piecewise((((512*a**6*c**5*f**2*exp(6*I*e) + 2560*I*a**6*c**4*d*f**2*exp(6*I*e) - 51
20*a**6*c**3*d**2*f**2*exp(6*I*e) - 5120*I*a**6*c**2*d**3*f**2*exp(6*I*e) + 2560*a**6*c*d**4*f**2*exp(6*I*e) +
 512*I*a**6*d**5*f**2*exp(6*I*e))*exp(-6*I*f*x) + (2304*a**6*c**5*f**2*exp(8*I*e) + 13056*I*a**6*c**4*d*f**2*e
xp(8*I*e) - 29184*a**6*c**3*d**2*f**2*exp(8*I*e) - 32256*I*a**6*c**2*d**3*f**2*exp(8*I*e) + 17664*a**6*c*d**4*
f**2*exp(8*I*e) + 3840*I*a**6*d**5*f**2*exp(8*I*e))*exp(-4*I*f*x) + (4608*a**6*c**5*f**2*exp(10*I*e) + 29184*I
*a**6*c**4*d*f**2*exp(10*I*e) - 76800*a**6*c**3*d**2*f**2*exp(10*I*e) - 101376*I*a**6*c**2*d**3*f**2*exp(10*I*
e) + 66048*a**6*c*d**4*f**2*exp(10*I*e) + 16896*I*a**6*d**5*f**2*exp(10*I*e))*exp(-2*I*f*x))/(-24576*I*a**9*c*
*6*f**3*exp(12*I*e) + 147456*a**9*c**5*d*f**3*exp(12*I*e) + 368640*I*a**9*c**4*d**2*f**3*exp(12*I*e) - 491520*
a**9*c**3*d**3*f**3*exp(12*I*e) - 368640*I*a**9*c**2*d**4*f**3*exp(12*I*e) + 147456*a**9*c*d**5*f**3*exp(12*I*
e) + 24576*I*a**9*d**6*f**3*exp(12*I*e)), Ne(-24576*I*a**9*c**6*f**3*exp(12*I*e) + 147456*a**9*c**5*d*f**3*exp
(12*I*e) + 368640*I*a**9*c**4*d**2*f**3*exp(12*I*e) - 491520*a**9*c**3*d**3*f**3*exp(12*I*e) - 368640*I*a**9*c
**2*d**4*f**3*exp(12*I*e) + 147456*a**9*c*d**5*f**3*exp(12*I*e) + 24576*I*a**9*d**6*f**3*exp(12*I*e), 0)), (x*
(-(c**3 + 5*I*c**2*d - 11*c*d**2 - 15*I*d**3)/(8*a**3*c**4 + 32*I*a**3*c**3*d - 48*a**3*c**2*d**2 - 32*I*a**3*
c*d**3 + 8*a**3*d**4) + (c**3*exp(6*I*e) + 3*c**3*exp(4*I*e) + 3*c**3*exp(2*I*e) + c**3 + 5*I*c**2*d*exp(6*I*e
) + 13*I*c**2*d*exp(4*I*e) + 11*I*c**2*d*exp(2*I*e) + 3*I*c**2*d - 11*c*d**2*exp(6*I*e) - 21*c*d**2*exp(4*I*e)
 - 13*c*d**2*exp(2*I*e) - 3*c*d**2 - 15*I*d**3*exp(6*I*e) - 11*I*d**3*exp(4*I*e) - 5*I*d**3*exp(2*I*e) - I*d**
3)/(8*a**3*c**4*exp(6*I*e) + 32*I*a**3*c**3*d*exp(6*I*e) - 48*a**3*c**2*d**2*exp(6*I*e) - 32*I*a**3*c*d**3*exp
(6*I*e) + 8*a**3*d**4*exp(6*I*e))), True)) - I*d**4*log((I*c - d)/(I*c*exp(2*I*e) + d*exp(2*I*e)) + exp(2*I*f*
x))/(a**3*f*(c - I*d)*(c + I*d)**4)

________________________________________________________________________________________